<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        body {
            background-color: darkblue;
        }
        .box {
            width: 400px;
            height: 400px;
            position: relative;
            margin: 100px auto;
            transform-style: preserve-3d;
            animation: move 4s linear infinite;
        }
        .front,.back,.left,.right,.top,.bottom {
            width: 200px;
            height: 200px;
            position: absolute;
            top:0;
            left: 0;
            text-align: center;
            line-height: 200px;
            border-radius: 20px;
            /*opcity: 0.5;*/
        }
        span {
            display: block;
            text-align: center;
            font: bolder 28px/200px "microsoft yahei";
        }
        .front {
            background-color: deeppink;
            transform: translateZ(100px);

        }
        .back {
            background-color: red;
            transform: translateZ(-100px);
        }
        .left {
            background-color: blue;
            transform:  rotateY(-90deg) translateZ(100px);
        }
        .right {
            background-color: green;
            transform:  rotateY(90deg) translateZ(100px);
        }
        .top {
            background-color: purple;
            transform:  rotateX(90deg) translateZ(100px);
        }
        .bottom {
            background-color: yellow;
            transform:  rotatex(-90deg) translateZ(100px);
        }
        @keyframes move {
            from {
                transform: rotateX(30deg) rotateY(30deg) rotateZ(30deg);
            }to {
                 transform: rotateX(360deg) rotateY(30deg) rotateZ(360deg);
            }
        }
    </style>
</head>
<body>
<div class="box">
    <div class="front"><span>front</span></div>
    <div class="back"><span>back</span></div>
    <div class="left"><span>left</span></div>
    <div class="right"><span>right</span></div>
    <div class="top"><span>top</span></div>
    <div class="bottom"><span>bottom</span></div>
</div>
</body>
</html>